package com.Stream.A01StreamLiu;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

public class A09_Stream {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<String>();
        Collections.addAll(list, "张无忌", "周芷若", "赵敏", "张强", "张三丰", "张翠山", "张良", "王二麻子", "谢广坤");

        // foreach
        // list.stream().forEach(System.out::println);
        // count
        // System.out.println(list.stream().count());
        System.out.println(Arrays.toString(list.stream().toArray(v -> new String[v])));
    }
}
